﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using YTCMS.Services.Services;
using YTCMS.Core;

namespace App.Controllers
{
    public class HotelController : Controller
    {
        private readonly IhotelService _hotel;
        public HotelController(IhotelService hotel)
        {
            this._hotel = hotel;
        }
        //
        // GET: /Hotel/
        public ActionResult Index()
        {
            var model = _hotel.GetMany(s => s.State == (int)CommonState.正常);
            return View(model);
        }


        public ActionResult Details(int id)
        {
            var model = _hotel.Get(s => s.Id == id);
            return View(model);
        }
	}
}